-------------------------------------------------------------------------------
--
--  Spynesso's custom healing adding.
--
-------------------------------------------------------------------------------
if not Spy then Spy = {} end
Spy.bLoaded = false

-------------------------------------------------------------------------------
-- Spy.debugChatFrame = ChatFrame4

local SPY_CHAT_COLOR = {1.0, 0.5, 0.0}
local SPY_CHAT_ID    = 981

function Spy.AddMessage(text, rr, gg, bb, fade)
   local chat = Spy.debugChatFrame or DEFAULT_CHAT_FRAME
   if not chat then return end
   local r, g, b
   if rr and gg and bb then
      r, g, b = rr, gg, bb
   else
      r, g, b = unpack(SPY_CHAT_COLOR)
   end
   chat:AddMessage(text, r, g, b, SPY_CHAT_ID, fade)
end

function Spy.Print(text, ...)
   Spy.AddMessage(text:format(...))
end

printf = Spy.Print

function Spy.DebugPrint(text, ...)
   if SpyDB and SpyDB.bPrintDebug then
      Spy.Print(text, ...)
   end
end
debug = Spy.DebugPrint

function Spy.Error(text, ...)
   Spy.AddMessage(text:format(...), 1, 0, 0)
end

-------------------------------------------------------------------------------